#!/bin/bash

cp /boot/emmcboot.itb.bak /boot/emmcboot.itb
cp /boot/spi_flash.bin.bak /boot/spi_flash.bin
cp /boot/multi.its.bak /boot/multi.its
cp /boot/boot.scr.emmc.bak /boot/boot.scr.emmc

if [ -e "/dev/bm-top" ]; then
	flash_update -i /boot/spi_flash.bin -b 0x6000000
else
	echo skip flash update
fi
